#{extends 'CRUD/layout.html' /}

#{set 'moreStyles_1'}
<link rel="stylesheet" media="screen" href="@{'/public/javascripts/ext/CLEditor1_3_0/jquery.cleditor.css'}">
#{/set}

#{set 'moreScripts_1'}
#{script 'ext/CLEditor1_3_0/jquery.cleditor.min.js' /}
<script type="text/javascript">
    $(document).ready(function() {
        $("#content_id").cleditor({
            width:'100%',
            controls:     // controls to add to the toolbar
                    "bold italic underline strikethrough subscript superscript | font size " +
                            "style | color highlight removeformat | bullets numbering | outdent " +
                            "indent | alignleft center alignright justify | undo redo | " +
                            "rule image link unlink | cut copy paste pastetext "
        });
    });
</script>
#{/set}

%{
    def keyVal = play.modules.crudsiena.SienaUtils.findKey(object)
  }%
<div id="crudShow" class="${type.name}">
	
	<h2 id="crudShowTitle">Quản lý Tin Tức -> Sửa Tin Tức</h2>
	
	<div class="objectForm">
	#{form action:@save(keyVal), enctype:'multipart/form-data'}



		#{crud.form }
            #{crud.custom 'content'}
                <label > Content: </label>
                <br/>
                <textarea name="object.content" id="content_id">${object.content}</textarea>
            #{/crud.custom}

            #{crud.custom 'language'}
                <label > Language </label>
                <input name="object.language" value="${lang}" disabled="true" />
            #{/crud.custom}


        #{/crud.form }
		<p class="crudButtons">
			<input type="submit" name="_save" value="&{'crud.save', type.modelName}" />
			<input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}" />
		</p>
	#{/form}
	</div>
	
	#{form @delete(keyVal)}
		<p class="crudDelete">
			<input type="submit" value="&{'crud.delete', type.modelName}" />
		</p>
	#{/form}

</div>